.class public Lcom/waiqin365/lightwork/tracker/c/a/a;
.super Lcom/waiqin365/lightwork/tracker/c/a/b;


# static fields
.field public static a:I

.field public static b:I

.field public static c:I

.field public static d:I

.field public static e:I

.field public static f:I

.field public static g:I

.field public static h:I

.field public static i:I

.field public static j:I

.field public static k:I

.field public static l:I

.field public static m:I


# instance fields
.field private r:Ljava/util/ArrayList;

.field private s:Ljava/text/SimpleDateFormat;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const/16 v0, 0x3e9

    sput v0, Lcom/waiqin365/lightwork/tracker/c/a/a;->a:I

    const/16 v0, 0x3ea

    sput v0, Lcom/waiqin365/lightwork/tracker/c/a/a;->b:I

    const/16 v0, 0x3eb

    sput v0, Lcom/waiqin365/lightwork/tracker/c/a/a;->c:I

    const/16 v0, 0x3ec

    sput v0, Lcom/waiqin365/lightwork/tracker/c/a/a;->d:I

    const/16 v0, 0x3ed

    sput v0, Lcom/waiqin365/lightwork/tracker/c/a/a;->e:I

    const/16 v0, 0x44d

    sput v0, Lcom/waiqin365/lightwork/tracker/c/a/a;->f:I

    const/16 v0, 0x44e

    sput v0, Lcom/waiqin365/lightwork/tracker/c/a/a;->g:I

    const/16 v0, 0x44f

    sput v0, Lcom/waiqin365/lightwork/tracker/c/a/a;->h:I

    const/16 v0, 0x450

    sput v0, Lcom/waiqin365/lightwork/tracker/c/a/a;->i:I

    const/16 v0, 0x451

    sput v0, Lcom/waiqin365/lightwork/tracker/c/a/a;->j:I

    const/16 v0, 0x452

    sput v0, Lcom/waiqin365/lightwork/tracker/c/a/a;->k:I

    const/16 v0, 0x453

    sput v0, Lcom/waiqin365/lightwork/tracker/c/a/a;->l:I

    const/16 v0, 0x7cf

    sput v0, Lcom/waiqin365/lightwork/tracker/c/a/a;->m:I

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;ILjava/util/Date;)V
    .locals 2

    const/4 v0, 0x1

    invoke-direct {p0, v0}, Lcom/waiqin365/lightwork/tracker/c/a/b;-><init>(I)V

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/lightwork/tracker/c/a/a;->r:Ljava/util/ArrayList;

    new-instance v0, Ljava/text/SimpleDateFormat;

    const-string/jumbo v1, "yyyy-MM-dd HH:mm:ss"

    invoke-direct {v0, v1}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    iput-object v0, p0, Lcom/waiqin365/lightwork/tracker/c/a/a;->s:Ljava/text/SimpleDateFormat;

    iget-object v0, p0, Lcom/waiqin365/lightwork/tracker/c/a/a;->r:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    invoke-direct {p0, p1}, Lcom/waiqin365/lightwork/tracker/c/a/a;->a(Landroid/content/Context;)V

    invoke-direct {p0, p1, p2, p3}, Lcom/waiqin365/lightwork/tracker/c/a/a;->a(Landroid/content/Context;ILjava/util/Date;)V

    return-void
.end method

.method private a(Landroid/content/Context;)V
    .locals 6

    invoke-static {}, Lcom/fiberhome/xloc/d/b;->d()Lcom/fiberhome/xloc/d/d;

    move-result-object v0

    if-eqz v0, :cond_0

    invoke-static {}, Lcom/fiberhome/xloc/d/b;->d()Lcom/fiberhome/xloc/d/d;

    move-result-object v0

    invoke-virtual {v0}, Lcom/fiberhome/xloc/d/d;->b()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightwork/tracker/c/a/a;->p:Ljava/util/HashMap;

    const-string/jumbo v1, "key"

    invoke-static {}, Lcom/fiberhome/xloc/d/b;->d()Lcom/fiberhome/xloc/d/d;

    move-result-object v2

    invoke-virtual {v2}, Lcom/fiberhome/xloc/d/d;->b()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightwork/tracker/c/a/a;->p:Ljava/util/HashMap;

    const-string/jumbo v1, "cmd"

    const-string/jumbo v2, "STATUSREPORT"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    iget-object v0, p0, Lcom/waiqin365/lightwork/tracker/c/a/a;->p:Ljava/util/HashMap;

    const-string/jumbo v1, "zt"

    const-string/jumbo v2, "gzip"

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    iget-object v0, p0, Lcom/waiqin365/lightwork/tracker/c/a/a;->p:Ljava/util/HashMap;

    const-string/jumbo v1, "clientid"

    const-string/jumbo v2, "%s%s"

    const/4 v3, 0x2

    new-array v3, v3, [Ljava/lang/Object;

    const/4 v4, 0x0

    const-string/jumbo v5, "gaeaclient-android-"

    aput-object v5, v3, v4

    const/4 v4, 0x1

    const v5, 0x7f0808bb

    invoke-virtual {p1, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v5

    aput-object v5, v3, v4

    invoke-static {v2, v3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    iget-object v0, p0, Lcom/waiqin365/lightwork/tracker/c/a/a;->p:Ljava/util/HashMap;

    const-string/jumbo v1, "clientver"

    invoke-static {p1}, Lcom/fiberhome/gaea/client/d/a;->a(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    return-void
.end method

.method private a(Landroid/content/Context;ILjava/util/Date;)V
    .locals 6

    const/4 v0, 0x0

    invoke-direct {p0, p1, p2, p3}, Lcom/waiqin365/lightwork/tracker/c/a/a;->b(Landroid/content/Context;ILjava/util/Date;)Lcom/waiqin365/base/db/statusreport/e;

    move-result-object v1

    invoke-static {p1}, Lcom/waiqin365/base/db/statusreport/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/statusreport/f;

    move-result-object v2

    invoke-virtual {v2}, Lcom/waiqin365/base/db/statusreport/f;->a()Lcom/waiqin365/base/db/statusreport/StatusReportDao;

    move-result-object v2

    invoke-virtual {v2}, Lcom/waiqin365/base/db/statusreport/StatusReportDao;->loadAll()Ljava/util/List;

    move-result-object v2

    invoke-static {p1}, Lcom/waiqin365/base/db/statusreport/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/statusreport/f;

    move-result-object v3

    invoke-virtual {v3}, Lcom/waiqin365/base/db/statusreport/f;->a()Lcom/waiqin365/base/db/statusreport/StatusReportDao;

    move-result-object v3

    const/4 v4, 0x1

    new-array v4, v4, [Lcom/waiqin365/base/db/statusreport/e;

    aput-object v1, v4, v0

    invoke-virtual {v3, v4}, Lcom/waiqin365/base/db/statusreport/StatusReportDao;->insertOrReplaceInTx([Ljava/lang/Object;)V

    if-eqz v2, :cond_0

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v3

    if-lez v3, :cond_0

    iget-object v3, p0, Lcom/waiqin365/lightwork/tracker/c/a/a;->r:Ljava/util/ArrayList;

    invoke-virtual {v3, v2}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z

    :cond_0
    iget-object v2, p0, Lcom/waiqin365/lightwork/tracker/c/a/a;->r:Ljava/util/ArrayList;

    invoke-virtual {v2, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    new-instance v2, Lorg/json/JSONArray;

    invoke-direct {v2}, Lorg/json/JSONArray;-><init>()V

    new-instance v3, Lorg/json/JSONObject;

    invoke-direct {v3}, Lorg/json/JSONObject;-><init>()V

    move v1, v0

    :goto_0
    :try_start_0
    iget-object v0, p0, Lcom/waiqin365/lightwork/tracker/c/a/a;->r:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-ge v1, v0, :cond_1

    new-instance v4, Lorg/json/JSONObject;

    invoke-direct {v4}, Lorg/json/JSONObject;-><init>()V

    const-string/jumbo v5, "time"

    iget-object v0, p0, Lcom/waiqin365/lightwork/tracker/c/a/a;->r:Ljava/util/ArrayList;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/db/statusreport/e;

    invoke-virtual {v0}, Lcom/waiqin365/base/db/statusreport/e;->c()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v4, v5, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v5, "code"

    iget-object v0, p0, Lcom/waiqin365/lightwork/tracker/c/a/a;->r:Ljava/util/ArrayList;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/db/statusreport/e;

    invoke-virtual {v0}, Lcom/waiqin365/base/db/statusreport/e;->b()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v4, v5, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string/jumbo v5, "message"

    iget-object v0, p0, Lcom/waiqin365/lightwork/tracker/c/a/a;->r:Ljava/util/ArrayList;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/base/db/statusreport/e;

    invoke-virtual {v0}, Lcom/waiqin365/base/db/statusreport/e;->d()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v4, v5, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    invoke-virtual {v2, v4}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;

    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_0

    :cond_1
    invoke-static {}, Lcom/fiberhome/xloc/d/b;->d()Lcom/fiberhome/xloc/d/d;

    move-result-object v0

    if-eqz v0, :cond_2

    invoke-static {}, Lcom/fiberhome/xloc/d/b;->d()Lcom/fiberhome/xloc/d/d;

    move-result-object v0

    invoke-virtual {v0}, Lcom/fiberhome/xloc/d/d;->b()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_2

    const-string/jumbo v0, "head"

    invoke-static {}, Lcom/fiberhome/xloc/d/b;->d()Lcom/fiberhome/xloc/d/d;

    move-result-object v1

    invoke-virtual {v1}, Lcom/fiberhome/xloc/d/d;->b()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v3, v0, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    :cond_2
    const-string/jumbo v0, "body"

    invoke-virtual {v3, v0, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    :goto_1
    invoke-virtual {v3}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightwork/tracker/c/a/a;->a(Ljava/lang/String;)V

    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    goto :goto_1
.end method

.method private b(Landroid/content/Context;ILjava/util/Date;)Lcom/waiqin365/base/db/statusreport/e;
    .locals 3

    new-instance v0, Lcom/waiqin365/base/db/statusreport/e;

    invoke-direct {v0}, Lcom/waiqin365/base/db/statusreport/e;-><init>()V

    iget-object v1, p0, Lcom/waiqin365/lightwork/tracker/c/a/a;->s:Ljava/text/SimpleDateFormat;

    invoke-virtual {v1, p3}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->b(Ljava/lang/String;)V

    sparse-switch p2, :sswitch_data_0

    const-string/jumbo v1, "E999"

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->a(Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f0808b4

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->c(Ljava/lang/String;)V

    :goto_0
    return-object v0

    :sswitch_0
    const-string/jumbo v1, "E001"

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->a(Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f0808a8

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->c(Ljava/lang/String;)V

    goto :goto_0

    :sswitch_1
    const-string/jumbo v1, "E002"

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->a(Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f0808a9

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->c(Ljava/lang/String;)V

    goto :goto_0

    :sswitch_2
    const-string/jumbo v1, "E003"

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->a(Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f0808aa

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->c(Ljava/lang/String;)V

    goto :goto_0

    :sswitch_3
    const-string/jumbo v1, "E004"

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->a(Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f0808ab

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->c(Ljava/lang/String;)V

    goto :goto_0

    :sswitch_4
    const-string/jumbo v1, "E005"

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->a(Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f0808ac

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->c(Ljava/lang/String;)V

    goto :goto_0

    :sswitch_5
    const-string/jumbo v1, "E101"

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->a(Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f0808ad

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->c(Ljava/lang/String;)V

    goto :goto_0

    :sswitch_6
    const-string/jumbo v1, "E102"

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->a(Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f0808ae

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->c(Ljava/lang/String;)V

    goto/16 :goto_0

    :sswitch_7
    const-string/jumbo v1, "E103"

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->a(Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f0808af

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->c(Ljava/lang/String;)V

    goto/16 :goto_0

    :sswitch_8
    const-string/jumbo v1, "E104"

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->a(Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f0808b0

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->c(Ljava/lang/String;)V

    goto/16 :goto_0

    :sswitch_9
    const-string/jumbo v1, "E105"

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->a(Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f0808b1

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->c(Ljava/lang/String;)V

    goto/16 :goto_0

    :sswitch_a
    const-string/jumbo v1, "E106"

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->a(Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f0808b2

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->c(Ljava/lang/String;)V

    goto/16 :goto_0

    :sswitch_b
    const-string/jumbo v1, "E107"

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->a(Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f0808b3

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/base/db/statusreport/e;->c(Ljava/lang/String;)V

    goto/16 :goto_0

    :sswitch_data_0
    .sparse-switch
        0x3e9 -> :sswitch_0
        0x3ea -> :sswitch_1
        0x3eb -> :sswitch_2
        0x3ec -> :sswitch_3
        0x3ed -> :sswitch_4
        0x44d -> :sswitch_5
        0x44e -> :sswitch_6
        0x44f -> :sswitch_7
        0x450 -> :sswitch_8
        0x451 -> :sswitch_9
        0x452 -> :sswitch_a
        0x453 -> :sswitch_b
    .end sparse-switch
.end method
